package com.neusoft.handoverserver.controller;


import com.neusoft.handoverserver.dto.HandoverSearch;
import com.neusoft.handoverserver.dto.RespBean;
import com.neusoft.handoverserver.entity.CustomerHandover;
import com.neusoft.handoverserver.service.ICustomerHandoverService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 客户交接表 前端控制器
 * </p>
 *
 * @author liuxp
 * @since 2021-07-12
 */
@RestController
@RequestMapping("/customerHandover")
public class CustomerHandoverController {
    @Autowired
    ICustomerHandoverService iCustomerHandoverService;
    @PostMapping("/addCustomerHandover")
    RespBean addCustomerHandover(@RequestBody CustomerHandover customerHandover){
        return iCustomerHandoverService.addCustomerHandover(customerHandover);
    }

    @PostMapping("/searchCustomerHandover")
    RespBean searchHandover(@RequestBody HandoverSearch handoverSearch){
        System.out.println(handoverSearch);
        return iCustomerHandoverService.searchHandover(handoverSearch);
    }
}

